<html>
	<head>
		<title>Complex Layout</title>
		<link rel="stylesheet" type="text/css"
			href="resources/styles/ext-all.css" />
			
			<link href="../resources/styles/ext-all.css" rel="stylesheet" type="text/css"/>
			<link href="../resources/styles/screen.css" rel="stylesheet" type="text/css" />


		<script type="text/javascript" src="./resources/scripts/ext-base.js"></script>
		<script type="text/javascript" src="./resources/scripts/ext-all.js"></script>
		<script type="text/javascript"
			src="./resources/scripts/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="./resources/scripts/examples.js"></script>


<style type="text/css">

 html, body {
            font: normal 12px verdana;
            margin: 0;
            padding: 0;
            border: 0 none;
        }

    

		* {
			margin: 0;
			padding: 0;
		}
		.clear { clear: both; }
		#content {
		}
		#main {
			
		}
		#sidebar {
			width: 600px;
			float: left;
			padding: 0px 0 0 20px;
			border:1px solid #c3daf9;
			
		}
	#panel-basic{
	padding-left:0.56cm
	}
    	
		
		#sidebar ul {
			list-style: inside;
		}
	</style>
</head>



<body>




	<script type="text/javascript">
	Ext.BLANK_IMAGE_URL='resources/images/default/s.gif';
	Ext.onReady(function(){
    // shorthand
   var Tree = Ext.tree;
        var root=new Tree.TreeNode({
               id:'id',
               text:'Root',
               draggable:false //不允许拖拽
                                      //icon:'im2.gif',//自定义节点图标

        });
        var node1=new Tree.TreeNode({
        	id:'1',
        	text:'node1'
        	});
        	
        var node2=new Tree.TreeNode({
        	id:'2',
        	text:'node2'
        	});
        //搞个有超链接的叶子   // hrefTarget:'_blank'   新窗口打开链接   hrefTarget:"mainFrame",


     var node11=new Tree.TreeNode(
     	{id:'11', 
     	 href:"./project/customer.html",
     	 hrefTarget:"fmain",
     	 text:'link',
     	 leaf:false}
     	 ); 
     
   //  <a href="#"  onclick="javascript:openf('./project/customer.html');return true;">
       node1.appendChild(node11);//添加一个叶子
       var node21=new Tree.TreeNode(
       	{id:'21',
       	 href:"./project/customer.html",
     	 hrefTarget:"fmain",
       	text:'请左击我',
       	leaf:false}
       	);
       	
       var node22=new Tree.TreeNode(
       {id:'22',
       href:"./project/DemoLay.html",
     	 hrefTarget:"fmain",
       text:'Test',
       leaf:true}
       );
       
        var node23=new Tree.TreeNode(
       {id:'23',
       href:"./project/DemoLay.html",
     	 hrefTarget:"fmain",
       text:'Test',
       leaf:true}
       );
       
        var node4=new Tree.AsyncTreeNode({
               id:'4',
               text:'node4',
               leaf:false,
               loader:new Tree.TreeLoader({dataUrl:'tree.txt'})
               });
               
        node2.appendChild(
        	[
        	node21,
        	node22,
        	node23
        	]);
        	
        root.appendChild([node1,node2,node4]);
        var treePanel=new Tree.TreePanel({
                 el:'sidebar',
                 useArrows:false,
                 autoScroll:true,
                 animate:true,
                 enableDD:true,
                //是否显示跟节点 rootVisible:false,
                 containerScroll: true});
        treePanel.setRootNode(root);
        treePanel.render();
        root.expand();
});
   </script>
<div id="panel-basic" ></div>


	<div id="content" >
		
		
		
	<div id="sidebar" style="overflow:auto; height:100%;width:280px; solid #c3daf9;"></div>
		
			
			<iframe id="fmain" name="fmain" scrolling="auto" frameborder="0" width="100%" height="100%"  src=""></iframe>
		
		
	</div>
	

<script type="text/javascript">
		var s,m,f;
        var openf = function(l) {
			f.src = l;
        };
		window.onload = function() {
			s = document.getElementById('sidebar');
			m = document.getElementById('main');
			f = document.getElementById('fmain');
			var w = window.screen.availWidth - 250;
			var h = window.screen.availHeight - 150;
			m.style.width = w + 'px';
			m.style.height = h + 'px';
			s.style.height = h + 'px';
		};

		var go = function(model, url){
			window.location.href = url;
		};
	</script>
	
	<script type="text/javascript">
	
 	var p = new Ext.Panel({
        title: '上海好景科技有限公司ERP管理系统',
        collapsible:true,
        renderTo: 'panel-basic',
        width:1212,
        height:80
        
    });
<div id="tabs" style="margin:15px 0;"></div>

</script>
	</body>
</html>
